package org.agpsoft.datareceiverinfrastructure.transmitter;

import org.agpsoft.datareceiverinfrastructure.common.IDecodedData;
import org.agpsoft.datareceiverinfrastructure.common.IElementInitiator;
import org.agpsoft.datareceiverinfrastructure.exception.DataReceiverNULLObjectException;
import org.agpsoft.datareceiverinfrastructure.exception.DataReceiverTransmitException;

/**
 * This interface aims to send decoded data to target and also record it
 * @author Ali Gokalp Peker
 */
public interface IDataTransmitter extends IElementInitiator{
	
	/**
	 * Sends data to transmitter target, implementation should be asynchronous transmit protocol
	 * @param data Data to transmit , can not be null
	 * @return Returns transmitted data length
	 * @throws DataReceiverTransmitException
	 * @throws DataReceiverNULLObjectException
	 */
	public int sendData( IDecodedData data ) throws DataReceiverTransmitException, DataReceiverNULLObjectException;
}
